const Koa = require('koa')
const path = require('path')
const InitManager = require('./core/init')
const catchError = require('./middlewares/exception')
const bodyParser = require('koa-bodyparser')
const static = require('koa-static')

const app = new Koa()
app.use(catchError)
app.use(bodyParser())
app.use(static(path.join(__dirname,'./static')))
InitManager.initCore(app)

app.listen(8888, () => {
  console.log(`服务运行于端口8888`)
})